🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / androidApp / src / google / kotlin / org / meshtastic / app / map / tiles / RasterBasemap.kt
Displaying Raw • Download
androidApp/src/google/kotlin/org/meshtastic/app/map/tiles/RasterBasemap.kt renovate/fastlane-2.x-lockfile (423f9d44) Text, 2.21 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.app.map.tiles
Tff7b72import T7ee787org.meshtastic.feature.map.tiles.CustomTileProviderConfig
Tff7b72import T7ee787org.meshtastic.feature.map.tiles.RasterTileSpec
Tff7b72import T7ee787org.meshtastic.feature.map.tiles.isValidTileUrlTemplate
T8b949e/**
* A raster basemap the Google map can draw, once a selected id has been resolved to something concrete.
*
* A source we ship and a source the user typed in differ only in where the URL template came from, so both arrive here
* as [Remote] and the map stops caring which it is.
*/
Tff7b72sealed Tff7b72interface T56d364RasterBasemap Tb4b4b4{
Tff7b72val Te6edf3idTb4b4b4: Tffa657String
T8b949e/** Tiles fetched from a server. */
Tff7b72data Tff7b72class T56d364RemoteTb4b4b4(Tff7b72override Tff7b72val Te6edf3idTb4b4b4: Tffa657StringTb4b4b4, Tff7b72val Te6edf3specTb4b4b4: Te6edf3RasterTileSpecTb4b4b4) Tb4b4b4: Te6edf3RasterBasemap
T8b949e/** An MBTiles archive stored on the device. */
Tff7b72data Tff7b72class T56d364LocalTb4b4b4(Tff7b72override Tff7b72val Te6edf3idTb4b4b4: Tffa657StringTb4b4b4, Tff7b72val Te6edf3uriTb4b4b4: Tffa657StringTb4b4b4) Tb4b4b4: Te6edf3RasterBasemap
Tb4b4b4}
T8b949e/**
* The user's stored source as something drawable, or null if it is not.
*
* A template that fails validation yields null rather than a provider that would request nonsense: the stored value is
* whatever was typed, and it can also have been valid when saved and edited into nonsense since.
*/
Tff7b72internal Tff7b72fun Te6edf3CustomTileProviderConfigTb4b4b4.Td2a8fftoRasterBasemapTb4b4b4(Tb4b4b4)Tb4b4b4: Te6edf3RasterBasemap? Tb4b4b4{
Tff7b72val Te6edf3archive Tff7b72= Te6edf3localUri
Tff7b72return Tff7b72when Tb4b4b4{
Te6edf3archive Tff7b72!Tff7b72= Tff7b72null Tff7b72-Tff7b72> Te6edf3RasterBasemapTb4b4b4.Te6edf3LocalTb4b4b4(Te6edf3id Tff7b72= Te6edf3idTb4b4b4, Te6edf3uri Tff7b72= Te6edf3archiveTb4b4b4)
Te6edf3urlTemplateTb4b4b4.Te6edf3isValidTileUrlTemplateTb4b4b4(Te6edf3requireHttps Tff7b72= Tff7b72falseTb4b4b4) Tff7b72-Tff7b72>
Te6edf3RasterBasemapTb4b4b4.Te6edf3RemoteTb4b4b4(Te6edf3id Tff7b72= Te6edf3idTb4b4b4, Te6edf3spec Tff7b72= Te6edf3RasterTileSpecTb4b4b4(Te6edf3tiles Tff7b72= Te6edf3listOfTb4b4b4(Te6edf3urlTemplateTb4b4b4)Tb4b4b4)Tb4b4b4)
Tff7b72else Tff7b72-Tff7b72> Tff7b72null
Tb4b4b4}
Tb4b4b4}
Served by rngit 1.5.4 - Generated in 0.1s